package com.car.loan.project.system.domain.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;

/**
 * @author huangding
 * @description 包含用户的部门表
 * @date 2019/10/16 20:23
 */
@Data
public class SysDeptByUserVo {

    /**
     * 部门ID
     */
    private Integer deptId;

    private Integer id;

    @ApiModelProperty("部门人员")
    private List<DeptUser> deptUsers = new ArrayList<>();

    /**
     * 父部门ID
     */
    private Long parentId;

    /**
     * 部门名称
     */
    private String deptName;

    private String name;

    @ApiModelProperty("选中状态")
    private boolean select = false;

    /**
     * 子部门
     */
    private List<SysDeptByUserVo> children = new ArrayList<>();

    public Integer getId() {
        return deptId;
    }

    public void setId(Integer id) {
        this.id = deptId;
    }

    public String getName() {
        return deptName;
    }

    public void setName(String name) {
        this.name = deptName;
    }

    @Data
    @ApiModel("部门用户")
    public static class DeptUser {

        @ApiModelProperty("用户id")
        private Long id;
        @ApiModelProperty("用户账号")
        private String name;

        @ApiModelProperty("用户状态")
        private Integer userStatus;

        @ApiModelProperty("选中状态")
        private boolean select = false;
    }
}
